<!DOCTYPE html>
<html lang="en">

<head>

    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>

    <script src="script/vue-2.4.0.js"></script>
</head>

<body>

    <div id="app">
        <!-- v-bind:src可以简写成:src 只针对与v-bind这个指令-->
        <a :href="link">
            <img :src="imgs" v-bind:alt="info">
        </a>

    </div>

    <script>
        var vm = new Vue({
            el: '#app',
            data: {
                imgs: 'imgs/baidu.jpg',
                info: '百度图标',
                link: 'http://www.baidu.com',
            },
        })
    </script>
</body>

</html>